package c1705;

import java.util.Scanner;

public class I {

    public static void main(String[] args) {
        double PI = Math.acos(-1);
        Scanner cin = new Scanner(System.in);
        double x, y, x1, y1;
        while (cin.hasNextInt()) {
            x = cin.nextInt();
            y = cin.nextInt();
            x1 = cin.nextInt();
            y1 = cin.nextInt();
            x1 -= x;
            y1 -= y;
            double r = Math.sqrt(x1 * x1 + y1 * y1);
            double angle = Math.asin(y1 / r);
            if (x1 < 0) angle = -angle - PI;
            int c = (int) (angle * 180 / PI);
            System.out.println((110 - c) % 360 / 40 + 1);
        }
        cin.close();
    }
}